<ion-view class="bg">
  <ion-header-bar class="bar bar-positive">
    <button class="button back-button buttons icon ion-ios-arrow-left button-clear"  nav-direction="back" ui-sref="tab.tool">返回</button>
    <h1 class="title">备忘录</h1>
    <div class="buttons">
      <button class="button button-icon icon ion-ios-plus-outline" ui-sref="addNote">

      </button>
    </div>
  </ion-header-bar>
  <ion-content>
    <ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
    <div ng-if="showloading" class="ion-spinner">
      <ion-spinner icon="lines" class="spinner-calm"></ion-spinner>
    </div>
    <ion-list show-delete="data.showDelete" class="myList" ng-if="showloading == false">
      <ion-item ng-repeat="data in noteData" ui-sref="addNote({content:data.CONTENT,id:data.ID})" >
        <div>
          <div class="icon-left contentData">{{data.CONTENT}}</div>
          <i class="timeDate" ng-if="(data.UPDATE_DATE| date : 'yyyy-MM-dd')==nowDate">{{data.UPDATE_DATE| date : "hh:mm:ss"}}</i>
          <i class="timeDate" ng-if="(data.UPDATE_DATE| date : 'yyyy-MM-dd')!=nowDate">{{data.UPDATE_DATE| date : "yyyy-MM-dd"}}</i>
          <ion-option-button class="button-assertive" ng-click="onItemDelete(data)">删除</ion-option-button>
        </div>
      </ion-item>
      <h5 ng-if="noteData==''" class="notFound">没有内容</h5>
    </ion-list>
    <ion-infinite-scroll on-infinite="loadMore()" distance="1%" ng-if="hasNextPage()"></ion-infinite-scroll>
  </ion-content>
</ion-view>

